<template>
  <div>
      <el-tabs v-model="activeName">
          <el-tab-pane label="用户管理" name="first">
              <el-table
                  height="460"
                  stripe :default-sort = "{prop: 'bill_id', order: 'ascending'}"
                  :data="tableData"
                  border
                  style="width: 100%;">
                  <el-table-column
                      align='center'
                      sortable
                      prop="uid"
                      label="用户id">
                  </el-table-column>
                  <el-table-column
                      align='center'
                      sortable
                      prop="bill_money"
                      label="充值金（元）">
                      <template slot-scope="scope">


                          <p>{{ scope.row.bill_money / 100 }}</p>


                      </template>
                  </el-table-column>
                  <el-table-column
                      prop="type"
                      label="类型">
                  </el-table-column>
                  <el-table-column
                      prop="status"
                      label="充值结果">
                      <template slot-scope="scope">
                          <p>{{ scope.row.status=='SUCCESS'?'充值成功':'充值失败'  }}</p>
                      </template>
                  </el-table-column>
                  <el-table-column
                      align='center'
                      sortable
                      prop="createdAt"
                      label="时间">
                  </el-table-column>
                  <el-table-column
                      prop="bill_id"
                      sortable
                      align='center'
                      label="充值id">
                  </el-table-column>
                  <el-table-column
                      align='center'
                      prop="out_trade_no"
                      label="充值单号（商户）">
                  </el-table-column>
                  <el-table-column
                      align='center'
                      sortable
                      prop="task_id"
                      label="任务id">
                  </el-table-column>
              </el-table>
              </el-tab-pane>
         <!-- <el-tab-pane label="配置管理" name="second">配置管理</el-tab-pane>
          <el-tab-pane label="角色管理" name="third">角色管理</el-tab-pane>
          <el-tab-pane label="定时任务补偿" name="fourth">定时任务补偿</el-tab-pane>-->
      </el-tabs>

  </div>
</template>
<script>
    export default {
        methods: {
            handleClick(row) {
                console.log(row);
            }
        },

        data() {
            return {
                activeName: 'first',
                tableData: []
            }
        },
        created(){
            this.getRechargeList()
        },
        methods:{
            getRechargeList(){
                this.$axios.post('/api/get/recharge').then(res=>{
                    if(res.data.err_code ==0){
                        this.tableData = res.data.data;
                    }
                }).catch(err=>{
                    this.$message(err)
                })
            }
        }
    }
</script>
